#define _CRT_SECURE_NO_WARNINGS 1
#include"Stack.h"
#include"Queue.h"
void StackTest()
{
	Stack st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	printf("%d ", StackTop(&st));//2
	StackPop(&st);
	StackPush(&st, 3);
	StackPush(&st, 4);
	StackPush(&st, 5);
	while (st._top)
	{
		printf("%d ", StackTop(&st));//5 4 3 1
		StackPop(&st);
	}// 2 5 4 3 1 
	printf("\n");
	

	StackDestory(&st);
}
void QueueTest()
{
	Queue qe;
	QueueInit(&qe);
	QueuePush(&qe, 1);
	printf("%d ", QueueFront(&qe));//1
	QueuePop(&qe);
	QueuePush(&qe, 2);
	QueuePush(&qe, 3);
	QueuePush(&qe, 4);
	while (qe._front)
	{
		printf("%d ", QueueFront(&qe));// 2 3 4  
		QueuePop(&qe);
	} // 1 2 3 4
	printf("\n");
	QueueDestroy(&qe);
}
int main()
{
	//StackTest();
	QueueTest();
	return 0;
}